solving higher degree polynomials